<template>
	<view>
		<!-- 系统消息详情 -->
		<view class="system">
			<news :details="message_details"></news>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	import news from '../../components/news/news.vue'
	export default {
		components: {
			news
		},
		data() {
			return {
				logo: this.imgUrl + 'message_logo.png',
				obj: {
					message_id: ''
				}
			}
		},
		onReady() {
			if (this.message_details.type === "交易消息") {
				uni.setNavigationBarTitle({
					title: '交易详情'
				})
			} else {
				uni.setNavigationBarTitle({
					title: '消息详情'
				})
			}

		},
		computed: {
			...mapState({
				message_details: state => state.user.message_detail, //消息详情
			}),
		},
		mounted() {
			this.obj.message_id = this.message_details.id
			this.$api('memberreadMessage', this.obj).then(res => {
			})
		},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	@import './index.scss';
</style>
